package com.kewu.system.controller;

import com.github.pagehelper.PageInfo;
import com.kewu.common.global.ResponseData;
import com.kewu.common.util.HttpHeaderUtil;
import com.kewu.system.api.entity.SysUser;
import com.kewu.system.service.TestService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class TestController {
    private final TestService testService;

    @GetMapping("/")
    public ResponseData<PageInfo<SysUser>> list() {
        System.out.println(HttpHeaderUtil.getHeaderByName("token"));
        return ResponseData.success(testService.list());
    }
}
